<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>快递查询</title>
</head>
<body>
	<P>
		<select id="com" name="com">
			<option value="shengtong">申通</option>
			<option value="shunfeng">顺丰</option>
			<option value="zhongtong">中通</option>
			<option value="yuantong">圆通</option>
			<option value="debang">德邦</option>
			<option value="yunda">韵达</option>

		</select>
	</P>
	<P>
		快递单号:<input type="text" name="sn" id="sn" />
	</P>
	<P>
		<input type="button" id="cha" value="查询" />
	</P>
	<div id="msg"></div>
</body>
<script type="text/javascript">
	document.getElementById('cha').onclick = function(){
		var com = document.getElementById('com').value;
		var sn = document.getElementById('sn').value;

		var msg = document.getElementById('msg');

		var url = 'kuaidi.php?key=ff4735a30a7a4e5a8637146fd0e7cec9&show=html&order='+sn+'&id='+com+'&ord=desc';
		var xhr = new XMLHttpRequest();
		xhr.onreadystatechange = function(){
			if(this.readyState == 4){
				msg.innerHTML = this.responseText;
			}
		}
		xhr.open('get',url,true);
		xhr.send(null);
	}
</script>
</html>